package ve.com.ucv.changedetection.controller;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import ve.com.ucv.changedetection.io.CrawlerIO;
import ve.com.ucv.changedetection.objects.responses.ComparationResponse;
import ve.com.ucv.changedetection.objects.responses.CrawlerResponse;

/**
 * Created by josmaguirre on 1/27/15.
 */
@Controller
@RequestMapping("/rastreos")
public class CrawlerController {
    Logger logger = Logger.getLogger(CrawlerController.class);
    CrawlerIO crawlerIO = null;
    CrawlerResponse crawlerResponse = null;

    @RequestMapping(value = "/obenerRastreosSinComparacion", method = RequestMethod.POST)
    @ResponseBody
    CrawlerResponse getCrawlersWithoutComparations(){
        return getCrawlerIO().getCrawlsWhitoutComparations();
    }

    public CrawlerIO getCrawlerIO() {
        return crawlerIO;
    }

    public void setCrawlerIO(CrawlerIO crawlerIO) {
        this.crawlerIO = crawlerIO;
    }

    public CrawlerResponse getCrawlerResponse() {
        return crawlerResponse;
    }

    public void setCrawlerResponse(CrawlerResponse crawlerResponse) {
        this.crawlerResponse = crawlerResponse;
    }
}
